package com.wyman.context.event;

import com.wyman.context.ApplicationContext;
import com.wyman.context.ApplicationEvent;

/**
 * @Author 李伟民
 * @Description
 * @DateTime 2024/12/18 00:23
 */
public class ApplicationContextEvent extends ApplicationEvent {
    /**
     * Constructs a prototypical Event.
     * source就是发布事件的事件源头 这里上下文就是事件原
     * @param source The object on which the Event initially occurred.
     * @throws IllegalArgumentException if source is null.
     */
    public ApplicationContextEvent(Object source) {
        super(source);
    }

    public ApplicationContext getApplicationContext(){
        return (ApplicationContext) getSource();
    }


}
